package com.dotndot.controller.utils;

import android.util.Log;

import com.dotndot.MomApplication;

public class Debug
{

    public static final String DEBUG_GSLEE = "__gslee__";

    public static void printDebug( String inputStr )
    {
        try
        {
            if( MomApplication._DEBUG_ )
            {
                if( inputStr == null )
                    return;
                String[] log;
                if( inputStr.length() > 4000 )
                {
                    log = new String[(inputStr.length() / 4000) + 1];
                    for( int i = 0; i < log.length; i++ )
                    {
                        if( i == log.length - 1 )
                            Log.d(DEBUG_GSLEE, inputStr.substring(i * 4000, inputStr.length()));
                        else
                            Log.d(DEBUG_GSLEE, inputStr.substring(i * 4000, (i + 1) * 4000));
                    }
                }
                else
                    Log.d(DEBUG_GSLEE, inputStr);
            }
        }
        catch( Exception e )
        {
            e.printStackTrace();
        }
    }
}
